import * as actionTypes from './actionTypes'
import { fromJS } from 'immutable'
const defaultState = fromJS({
    articleTitle: '',
    articleContent: ''
})
export default (state = defaultState, action) => {
    console.log(action)
    switch (action.type){
        case actionTypes.GET_DETAIL_DATA:
            return state.merge({
                articleTitle: fromJS(action.articleTitle),
                articleContent: fromJS(action.articleContent)
            })
        default: 
        return state
    }
}